package gui.launch;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;

import javax.swing.BorderFactory;
import javax.swing.ButtonGroup;
import javax.swing.JPanel;
import javax.swing.JRadioButton;

import data.Color;

public class PlayerPanel extends JPanel implements ActionListener{
	private static final long	serialVersionUID	= 3757388226118211438L;
	private JRadioButton humanRadioButton;
	private JRadioButton computerRadioButton;
	
	public PlayerPanel(Color c) {
		super();
		
		build(c);
	}

	private void build(Color color) {
		setBorder(BorderFactory.createTitledBorder(color.name()));
		
		setLayout(new GridBagLayout());
		GridBagConstraints c = new GridBagConstraints(0, 0,
				1, 1,
				1, 1,
				GridBagConstraints.CENTER, GridBagConstraints.NONE,
				new Insets(0, 0, 0, 0),
				0, 0);
		
		humanRadioButton = new JRadioButton("Human");
		humanRadioButton.setSelected(true);
		
		JRadioButton computer = new JRadioButton("Computer");
		
		ButtonGroup group = new ButtonGroup();
		group.add(humanRadioButton);
		group.add(computer);
		
		humanRadioButton.addActionListener(this);
		computer.addActionListener(this);
		
		add(humanRadioButton);
		add(computer);
		

		setVisible(true);
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		// TODO Auto-generated method stub
		
	}
}
